// EMERGENT GAME TECHNOLOGIES PROPRIETARY INFORMATION
//
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Emergent Game Technologies and may not 
// be copied or disclosed except in accordance with the terms of that 
// agreement.
//
//      Copyright (c) 1996-2007 Emergent Game Technologies.
//      All Rights Reserved.
//
// Emergent Game Technologies, Chapel Hill, North Carolina 27517
// http://www.emergent.net

#ifndef CEGUIGAMEBRYOTEXTURE_H
#define CEGUIGAMEBRYOTEXTURE_H

#include "CEGUIBase.h"
#include "CEGUIRenderer.h"
#include "CEGUITexture.h"
#include "CEGUIGamebryoRenderer.h"

using namespace CEGUI;

class CEGUIGamebryoTexture : public Texture
{
private:
	/*************************************************************************
		Friends (to allow construction and destruction)
	*************************************************************************/
	friend	Texture* CEGUIGamebryoRenderer::createTexture(void);
	friend	Texture* CEGUIGamebryoRenderer::createTexture(const String& filename, const String& resourceGroup);
	friend	Texture* CEGUIGamebryoRenderer::createTexture(float size);
	friend	void	 CEGUIGamebryoRenderer::destroyTexture(Texture* texture);


	/*************************************************************************
		Construction & Destruction (by Renderer object only)
	*************************************************************************/
	CEGUIGamebryoTexture(Renderer* owner);
	virtual ~CEGUIGamebryoTexture(void);

public:
	virtual	ushort	getWidth(void) const		
		{return m_spGamebryoTexture->GetWidth();}
	virtual	ushort	getHeight(void) const		
		{return m_spGamebryoTexture->GetHeight();}
	virtual void loadFromFile(const String& filename, 
		const String& resourceGroup);
	virtual void loadFromMemory(const void* buffPtr, 
		uint buffWidth, uint buffHeight, PixelFormat pixelFormat);
	NiTexturePtr m_spGamebryoTexture;
};

#endif	// CEGUIGAMEBRYOTEXTURE_H
